package com.nbgs.demo.service.impl;

import com.nbgs.demo.dao.CardMapper;
import com.nbgs.demo.model.Card;
import com.nbgs.demo.service.CardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CardServiceImpl implements CardService {
    @Autowired
    private CardMapper cardMapper;
    @Override
    public void addCard(Card card) {
       cardMapper.addCard(card);
    }

    @Override
    public int findTypeIdByType(String type) {
        return cardMapper.findTypeIdByType(type);
    }

    @Override
    public void updateCard(int meterId,String cardNum) {
        cardMapper.updateCard(meterId,cardNum);
    }
}
